/*
 * BusStationAPI.h
 *
 *  Created on: Jul 17, 2013
 *      Author: m
 */

#ifndef BUSSTATIONAPI_H_
#define BUSSTATIONAPI_H_

#include "application_common.h"
#include "messages.h"
#include "Visitor.h"
#include "ConcurrentMessageQueue.h"

namespace application
{

class BusStationAPI
{
protected:
    std::string m_replyQueueName;
    communication::MessageQueueInterface<BusStationReply>* m_replyChannel;

public:
    BusStationAPI( std::string ownerName );
    virtual ~BusStationAPI();

    void waitEntranceBus( Visitor &visitor )
    {
        this->waitBus( visitor, ENTRANCE_BUS_STATION );
    }

    void waitExitBus( Visitor &visitor )
    {
        this->waitBus( visitor, EXIT_BUS_STATION );
    }

protected:
    void waitBus( Visitor &visitor, busStationType busStationType );
};

} /* namespace business */
#endif /* BUSSTATIONAPI_H_ */
